package com.ermace.robo.jumper.game.GameObjects;

import android.os.Parcel;
import android.os.Parcelable;

import com.ermace.robo.jumper.game.GameView;
import com.ermace.robo.jumper.game.Player.Robot;

public class Ice extends Rectangle {

	/**
    *
    * This field is needed for Android to be able to
    * create new objects, individually or as arrays.
    *
    * This also means that you can use use the default
    * constructor to create the object and use another
    * method to hyrdate it as necessary.
    *
    */
	public static final Parcelable.Creator<Ice> CREATOR =
			new Parcelable.Creator<Ice>() {
		@Override
		public Ice createFromParcel(Parcel in) {
			return new Ice(in);
		}

		@Override
		public Ice[] newArray(int size) {
			return new Ice[size];
		}
	};
	
	public Ice(double x, double y, double length, int pic) {
		super(x, y, length, pic);
	}
	
	public Ice(Parcel in) {
		super(in);
	}
	
	@Override
	public void interact(Robot robot) {
		robot.setHorizontalAcceleration(GameView.SCREEN_WIDTH / 5);
	}

}
